<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<div id="app"></div>
<script type="text/javascript" src="../node_modules/vue/dist/vue.min.js"></script>
<script type="text/javascript">
    // 声明子节点  挂载子节点  使用子节点
    // 局部入口组件的创建
    var App = {
        data() {
            return {}
        },
        methods: {
            clickHandler() {
                console.log(this)
            }
        },
        template: '<div><button @click="clickHandler">点我</button></div>'
    }
    console.log(App);
    var vm = new Vue({
        el: "#app",
        data() {
            return {}
        },
        //挂载子组件
        components: {
            App: App
        },
        //父组件直接使用
        template: '<App></App>'
    })

    console.log(vm);
</script>
</body>
</html>